The present invention relates to a card system, and an integrated circuit (IC) card and a card reader/writer both used for the card system. In particular, the present invention relates to a card system in which an IC card, such as a JAVA card which is capable of transmitting and receiving data at a high rate, and a card reader/writer are used.
The present invention relates to a card system, and an IC card and a card reader/writer both used for the card system. In particular, the present invention relates to a card system in which a card, such as a JAVA card which is capable of transmitting and receiving data at a high rate is used, and an IC card and a card reader/writer used for the card system.
Magnetic cards have heretofore been used for many of the cash cards and the credit cards. Recently, counterfeiting of magnetic cards has been increased. Employing an IC card in lieu of a magnetic card has attracted attention. An IC card has an internal CPU for processing encryption and decipherment so that counterfeiting of the IC card is more difficult in comparison with the magnetic card. Much information can be stored in an IC card, and hence many of the IC cards are equipped with multi-functions.
A conventional card system will be described with reference to FIG. 1 which illustrates a diagram of a IC card system to which the present invention is applied. FIG. 1 illustrates a diagram showing structures of an IC card 10 and an IC card reader/writer 20 for reading information from the IC card 10 and/or recording information on the IC card 10. The IC card reader/writer 20 comprises a port terminal (PORT) 22 from and to which data is input and output, a clock terminal (CLOCK) 23 for outputting a clock signal for counting input and output timings of data, a reset terminal (RESET) 24 for outputting a reset signal which initiates operation of a CPU 11 located in the IC card 10, a power supply terminal (VDD) 25 for supplying power to drive the CPU 11 in the IC card 10 and a ground terminal (GND) 26.
The IC card reader/writer 20 further comprises a CPU 28 for controlling various signals which are output to terminals 22 to 26, a power supply 21 for driving the CPU 28 and a pull-up resistor 27 connected between the power supply 21 and the port terminal 22. The IC card 10 comprises terminals 12 to 16 which correspond to the terminals 22 to 26 of the IC card reader/writer 20, respectively, through which various signals are input to and output from the IC card 10. The IC card 10 further comprises a memory 17 for storing a program for carrying out half-duplex synchronous communication and user data, and a CPU 11 for executing the program stored in the memory 17.
A term xe2x80x9chalf-duplexxe2x80x9d used herein means a communication scheme for alternatingly transmitting data between two communication equipments to enable bi-directional communications. When one of the equipments transmits data, another equipment receives the data. Simultaneous transmission of data by both equipments is not allowed. For example, when data is output from the IC card reader/writer 20, the IC card 10 can not output data to the IC card reader/writer 20 and only receives data from the IC card reader/writer 20.
Operation of a system shown in FIG. 1 will be described. When the IC card 10 is mounted to the IC card reader/writer 20, power VDD is supplied to a main body of the IC card 10 through the power supply terminals 25 and 15 in response to an instruction from the CPU 28. More specifically, when the power supply terminal 25 and the ground terminal 26 are electrically connected with the power supply terminal 15 and the ground terminal 16, respectively, the CPU 11 is enabled to be driven.
Thereafter, a reset signal is output from the IC card reader/writer 20 via the reset terminal 24 in accordance with an instruction from the CPU 28. Then, a reset signal is supplied to the IC card 10 via the reset terminal 14 and in turn provided to the CPU 11. This brings the CPU 11 into such a state that the CPU 11 can be initiated to operate.
Subsequently, the IC card reader/writer 20 outputs a clock signal via the clock terminal 23 in accordance with an instruction from the CPU 28. Then, the output clock is provided to the CPU 11 of the IC card 10 via the clock terminal 13. Then, IC card reader/writer 20 outputs a data read request, and data which is to be written into the IC card 10, via the port terminal 22 in synchronization with a clock signal being output.
On the IC card 10, the CPU 11 reads out user data stored in the memory 17 to output the user data to the IC card reader/writer 20, and writes data supplied from the IC card reader/writer 20 into the memory 17 based upon the request and data which have been received by the IC card 10 in accordance with a scheme of half-duplex synchronous communication.
FIGS. 8 and 9 illustrate data formats used for the half-duplex synchronous communication. FIG. 8 illustrates data format when data communication is normally conducted and FIG. 9 illustrates data format when data communication is not normally conducted.
As shown in FIG. 8, a start bit which informs of transmission of data bits, data bits D0 through D7 which constitute substantially transmitted and received data and a parity bit from which it is checked whether the data has been correctly transferred are transmitted between the IC card reader/writer 20 and the IC card 10.
When the data communication has not been normally conducted as shown in FIG. 9, a data retransmission request signal is transmitted between the IC card reader/writer 20 and the IC card 10 for requesting a transmitting side to retransmit the data. In FIGS. 8 and 9, the clock signal comprises, for example, 512 pulses in each period. Each data transmitted and received at a VDD level or a Ground level.
The IC card reader/writer 20 and IC card 10 are controlled by the CPUs 28 and 11, so that each of the IC card reader/writer 20 and IC card 10 is brought in a state of an output mode for transmitting data or an input mode for receiving data, whilst both of the IC card reader/writer 20 and IC card 10 are not simultaneously brought into the output mode in order to carry out half-duplex data communication.
Operations of the IC card reader/writer 20 and the IC card 10 when data is normally transmitted from the IC card reader/writer 20 to the IC card 10 will be described.
As shown in FIG. 8, the IC card reader/writer 20 which is functioning as a data transmitting side in half-duplex communication is controlled by the CPU 28 so that it is brought into the output mode in periods T0 to T9 and input mode and in periods T10 and T11, respectively. More specifically,
(1) a start bit is transmitted in the beginning of T0.
(2) Data bits D0 to D7 are transmitted at T1 to T8, respectively.
(3) At T9, a parity bit having xe2x80x9c0xe2x80x9d or xe2x80x9c1xe2x80x9d which is determined depending upon data bits is transmitted.
(4) When a data retransmission request signal is transmitted at T10 and T11, the IC card reader/writer 20 is controlled to be able to receive the signal.
The IC card 10 which is functioning as a data receiving side in half-duplex communication is controlled so that it is brought into the input mode at all periods T0 to T11. More specifically,
(1) a start bit is received at T0.
(2) Data bits are received at T1 to T8.
(3) A parity bit is received at T9.
(4) The IC card 10 executes parity check with reference to the parity which has been received at T10, and T11. Since no error occurs, no data retransmission request signal is transmitted and information comprised of data bits D0 to D7 is stored in the memory 17.
Thus, the IC card reader/writer 20 functioning as a data transmitting side and the IC card 10 functioning as a data receiving side are brought into the input mode at periods T10 and T11, and the port terminals 12 and 22 are fixed at a VDD level by the pull-up resistor 27 located in the card reader/writer 20.
When the data has not been normally transmitted from the IC card reader/writer 20 to the IC card 10, the IC card reader/writer 20 functioning as a data transmitting side is brought into the output and input modes at periods T0 to T9 and T10 to T12, respectively, as shown in FIG. 9. More specifically,
(1) a start bit is transmitted at T0.
(2) Data bits are transmitted at T1 to T8.
(3) A parity bit is transmitted at T9.
(4) A data retransmission request signal transmitted is received at part of a period of T10, and at T11.
The IC card 10 functioning as a data receiving side is controlled so that it is brought into the input mode from period T0 to an intermediate point of T11 and at T12 and is brought into the output mode at an intermediate point of a period of T10 and at T11. More specifically,
(1) a start bit is received at T0.
(2) Data bits are received at T1 to T8.
(3) A parity bit is received at T9.
(4) The IC card 10 executes parity check with reference to the parity bit at timing including T10.
In this case, an error occurs, and hence the data retransmission request signal is transmitted back to the IC card reader/writer 20. When the IC card reader/writer 20 receives this signal, it retransmits the data to the IC card 10.
Accordingly, at timings excluding a part of T10, and T11 the IC card reader writer 20 functioning as a data transmitting side as well as the IC card 10 functioning as a data receiving side are in the input mode and the port terminals 12 and 22 are fixed at the VDD level by the pull-up resistor 27 located in the card reader/writer 20.
By using the above-mentioned protocol, data communication is carried out between the IC card 10 and the IC card reader/writer 20.
Data communication above described is suited for data communication at a rate such as 9600 bps. However it is not suited for a high speed data communication, a rate of which is for example 1228800 bps as is adopted in JAVA card in view of delayed speed of data.
FIG. 10 illustrates an operation of a system in a case wherein no data retransmission request signal is transmitted or received with a parity bit of xe2x80x9c1xe2x80x9d using the format as shown in FIG. 8 and data communication is conducted at a rate such as 1228800 bps. FIG. 11b illustrates an operation of a system in a case wherein no data retransmission request signal is transmitted or received with a parity bit of xe2x80x9c0xe2x80x9d using the format as shown in FIG. 8 and data communication is conducted at a rate such as 1228800 bps. FIG. 11a illustrates an operation of a system in a case wherein no data retransmission request signal is transmitted or received with a parity bit of xe2x80x9c0xe2x80x9d using the format as shown in FIG. 8 and data communications are conducted at a rate such as 9600 bps.
The data transfer rate in FIGS. 10 and 11a, that is, one period of each of T0 to T12 is, for example, 103 xcexcs(microsecond). A clock signal in one period comprises 512 pulses. One period of each of T0 to T12 in FIG. 11b is, for example, 810 nS. The clock signal in one period comprises four pulses.
The data is transmitted in a VDD level in an interval of T9 to T11 as shown in FIG. 10 if a parity bit is xe2x80x9c1xe2x80x9d. No problem occurs unlike the case in FIG. 11a. If the parity bit is xe2x80x9c1xe2x80x9d, the data is similarly transmitted in the VDD level in the interval of T9 to T11 as in case of data communication at a rate such as 9600 bps, so that no problem occur. This reason resides in that a rising edge of a data pulse up to the VDD level is not made to become dull by a delay time of the data.
The data is transmitted via the pull-up resistor 27 from the port terminal 22 at time of T10 as shown in FIG. 11a. At this time, a rising edge of a data pulse becomes dull. However, since the data pulse becomes the VDD level before the data is actually input form a transmitting side, presence or absence of an error signal can be accurately detected.
On the other hand, data may not come to the VDD level at T10 as well as at T11 when data communication is carried out at a high rate as shown in FIG. 11b. This makes it difficult to accurately detect presence or absence of an error signal since the data will not completely reach to the VDD level by a time when the data is actually input from a transmitting side.
FIGS. 12 and 13 show cases shown in FIG. 9, wherein a data retransmission request signal is transmitted when a parity bit is xe2x80x9c1xe2x80x9d. FIG. 12 shows an operation in a case wherein data communication is conducted at a high rate such as 1228800 bps. A data transfer rate in FIGS. 12 and 13 is the same as that in FIGS. 11a and 11b. 
A data signal rises to a VDD level at a timing T12 in both FIGS. 12 and 13. In case of FIG. 12, the data becomes the VDD level at T12. On the other hand, the data does not come up to the VDD level at T12 in case of FIG. 13. Accordingly, a falling edge of a start bit for next communication is not completely formed.
Most part of a dullness in a waveform of a rising edge of data signal is caused by a resistance element such as pull-up resistor and the like. The resistance of the pull-up resistor 27 may be increased by the frequent insertion or removal of the IC card 10 into or from the IC card reader/writer 20. The resistance may be also increased by touch of the terminals 12 to 16 on the IC card with fingers. Since the resistance is different due to variations among the IC card reader/writer 20, it is difficult to eliminate a dullness of a data signal waveform.
A delay time tw caused by a dullness in a waveform of a data signal is represented by a formula using natural logarithm as follows:
tw=xe2x88x92Ln{(VDDxe2x88x92Vth)/VDD}xc3x97Cxc3x97R
wherein C denotes capacitance of wiring and the like, R denotes the resistance of the pull-up resistor 27 and the like, and Vth denotes 0.7xc3x97VDD.
Assuming that C be 30 pF (a value recommended by ISO 7816), R be 20 Kohm (a value recommended by ISO 7816) and VDD be 5.5 V, then the tw is 720 nS(nanosecond).
At this time, the transfer rate is 103 xcexcS. The delay time of 720 nS of 103 xcexcS does not matter.
If the IC card is used at 4.91 MHz and 1228800 bps, a transfer rate of one bit is 810 nS as shown in FIG. 15. As a result, if a delay time of 720 nS should occur, erroneous detection of a signal, such as a data retransmitting request signal would then occur as mentioned above.
If the resistance R is doubled due to variations among the IC card reader/writers 20 and insertion and removal of the IC cards, then
tw=1.44 xcexcS
so that a maximum transfer rate would be reduced to 614400 bps.
Accordingly, it is necessary to provide another IC card reader/writer, designed to carry out data communication with a device such as JAVA card requiring high speed data communication, which is other than that for an IC card of low speed communication. However, provision of two sets of IC card reader/writers is wasteful. It has been demanded to make it possible to carry out data communication between an off the shelf IC card reader/writer and the JAVA card, etc.
It is therefore an object of the present invention to make it possible to carry out high rate data communication using an off the shelf IC card reader/writer.
In order to accomplish the object, in accordance with one aspect of the present invention, there is provided a card system wherein when data is transmitted and received over a signal line between an IC card and a card reader/writer for reading or writing of the data, a data transmitting side transmits a parity based upon content of the data together with the data over the signal line and a data receiving side checks whether or not there is any error in reception of data based upon content of the data and the parity received to transmit back to the data transmitting side a data retransmission request signal for requesting the data transmitting side to retransmit the data when there is an error; and wherein said IC card corrects a level of said signal line for requesting the data transmitting side to transmit next data when it is verified that there is no error in the reception of said data based upon content of said data and said parity received by the data receiving side.
In accordance with another aspect of the present invention, there is provided a card system wherein when data is transmitted and received over a signal line between an IC card and a card reader/writer for reading or writing of the data, a data transmitting side transmits a parity based upon content of the data together with the data over the signal line and a data receiving side checks whether or not there is any error in reception of data based upon content of the data and the parity received to transmit back to the data transmitting side a data retransmission request signal for requesting the data transmitting side to retransmit the data when there is an error; and wherein said IC card corrects a level of said signal line for requesting the data transmitting side to retransmit said data, after the receiving transmitting side transmits said data retransmission request signal.
In accordance with another aspect of the present invention, in case of said IC card being the data receiving side, the level of the signal line is corrected preferably during an interval from a reception of said parity to a reception of said data retransmission request signal by the data receiving side.
In case of said IC card being the data transmitting side, the level of said signal line is corrected preferably at a predetermined timing before next data is transmitted.
In accordance with another aspect of the present invention, there is provided an IC card used for a card system wherein when data is transmitted and received over a signal line between said IC card and a card reader/writer for reading or writing of the data, a data transmitting side transmits a parity based upon content of the data together with the data over the signal line and a data receiving side checks whether or not there is any error in reception of data based upon content of the data and the parity received to transmit back to the data transmitting side a data retransmission request signal for requesting the data transmitting side to retransmit the data when there is an error; and wherein said IC card corrects a level of said signal line for requesting the data transmitting side to transmit next data when it is verified that there is no error in the reception of said data based upon content of said data and said parity received by data receiving side.
In accordance with another aspect of the present invention, there is provided an IC card used for a card system wherein when data is transmitted and received over a signal line between said IC card and a card reader/writer for reading or writing of the data, a data transmitting side transmits a parity based upon content of the data together with the data over the signal line and a data receiving side checks whether or not there is any error in reception of data based upon content of the data and the parity received to transmit back to the data transmitting side a data retransmission request signal for requesting the data transmitting side to retransmit the data when there is an error; and wherein said IC card corrects a level of said signal line for requesting the data transmitting side to retransmit said data, after the receiving side transmits said data retransmission request signal.
In accordance with another aspect of the present invention, there is provided a card reader/writer for transmitting and receiving data being conducted for writing and reading of data thereto and therefrom, respectively.
Still other objects and advantages of the present invention will become readily apparent to those skilled in this art from the following detailed description, wherein only the preferred embodiment of the invention is shown and described, simply by way of illustration of the best mode contemplated of carrying out this invention. As will be realized, the invention is capable of other and different embodiments, and its several details are capable of modifications in various obvious respects, all without departing from the invention. Accordingly, the drawing and description are to be regarded as illustrative in nature, and not as restrictive.